package org.ccams.dao;

import java.util.List;
import org.ccams.domain.TPlanindetail;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class TPlanindetailDAO extends SqlMapClientDaoSupport{

    
    public TPlanindetailDAO() {
        super();
    }

    /**
	 * 返回指定id下的数据
	 * @return
	 */
	@SuppressWarnings({ "unchecked", "deprecation" })
	public  List<TPlanindetail> getById(String hid){		
		return getSqlMapClientTemplate().queryForList("t_planindetail.getById", hid);
	}
	
    
    public void insert(TPlanindetail record) {
        getSqlMapClientTemplate().insert("t_planindetail.abatorgenerated_insert", record);
    }

   
    public int updateByPrimaryKey(TPlanindetail record) {
        int rows = getSqlMapClientTemplate().update("t_planindetail.abatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

    
    public int updateByPrimaryKeySelective(TPlanindetail record) {
        int rows = getSqlMapClientTemplate().update("t_planindetail.abatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    
    public TPlanindetail selectByPrimaryKey(Long id) {
        TPlanindetail key = new TPlanindetail();
        key.setId(id);
        TPlanindetail record = (TPlanindetail) getSqlMapClientTemplate().queryForObject("t_planindetail.abatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    
    public int deleteByPrimaryKey(Long id) {
        TPlanindetail key = new TPlanindetail();
        key.setId(id);
        int rows = getSqlMapClientTemplate().delete("t_planindetail.abatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }
}